package top.kaoshanji.p2ch16b;

import top.kaoshanji.p2ch16a.IWomen;

/**
 * 代码清单-p2ch16b-184页a：丈夫类
 * @author kaoshanji
 * ^_^
 * create time 2025/3/23 19:15
 */
public class Husband extends Handler {

    // 丈夫只处理妻子的请求
    public Husband() {
        super(Handler.HUSBAND_LEVEL_REQUEST);
    }

    // 丈夫请示的答复
    @Override
    protected void response(IWomen women) {
        System.out.println("--------妻子向丈夫请示---------");
        System.out.println(women.getRequest());
        System.out.println("丈夫的答复：同意");
    }

}
